<template>
	<view class="">
		<textarea hold-keyboard>
		  <keyboard-accessory class="container" style="height: 50px;">
		    <cover-view style="flex: 1; background: green;">1</cover-view>
		    <cover-view style="flex: 1; background: red;">2</cover-view>
		  </keyboard-accessory>
		</textarea>
		<button @click="handleOpen">打开</button>
		<editor
			id="editor"
			placeholder="asdf"
			@input="handleInput"
			@ready="hadnleReady"
		></editor>
		
		<page-container :show="show" position="bottom">asdfasdf</page-container>
	</view>
</template>

<script>
	export default {
		data(){
			return {
				show:false
			}
		},
		methods:{
			handleOpen(){
				this.show = true
			},
			hadnleReady(){
				let that = this;
				const query = wx.createSelectorQuery()//创建节点查询器
				query.select('#editor').context()//选择id=editor的节点，获取节点内容信息
				query.exec(res=>{
					console.log(res)
				})
			},
			handleInput(e){
				console.log(e.detail)
			}
		}
	}
</script>

<style lang="scss" scoped>
	
</style>